<template>
  <div>
    <h1>热门新闻</h1>
    <div>
      <a href="http://www.woniuxy.com" @click="go($event,'/hot/local')">本地新闻</a>&nbsp;&nbsp;
      <a href="#" @click="go($event,'/hot/domestic')">国内新闻</a>&nbsp;&nbsp;
      <a href="#" @click="go($event,'/hot/international')">国际新闻</a>&nbsp;&nbsp;
    </div>
    <div>
      <router-view></router-view>
    </div>
  </div>
</template>

<script lang='ts' setup>
import {useRouter} from 'vue-router'
const router=useRouter()
const go=(e:MouseEvent,path:string)=>{
  e.preventDefault()
  router.push(path)
}
</script>

<style lang='scss' scoped>
</style>